Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix decryption check condition #44

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dbingham
Copy link

I believe the decryption check can never fail. The if checks for errors using ! -x $DECRYPTION. But -x checks for the existence of a file. And indeed, some random string never exists as a file, so the printf and exit will always be skipped.

I think something like ! -z was intended (-z checks for empty string). There is also a -n which is equivalent to ! -z. So this change switches to -n and quotes the expansion to avoid syntax errors.

`-x` checks for the existence of a file.  I think something like `! -z` was intended (`-z` checks for empty string).  There is also a `-n` which is equivalent to `! -z`.  So switch to `-n` and quote the expansion to avoid syntax errors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant